package com.haisen.common.utils;

import com.google.common.base.Stopwatch;
import org.joda.time.DateTime;

import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * <p>〈功能概述〉.
 *
 * @author haisen /20227/18
 */
public class DateUtil {

    public static String date() {
        return DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
    }

    public static String dateMilli() {
        return DateTime.now().toString("yyyy-MM-dd HH:mm:ss:SSS");
    }

    public static void main(String[] args) {
        System.out.println(dateMilli());
        ThreadUtil.sleep(1000);
        System.out.println(dateMilli());
    }


}
